<div id="Update-imports"></div>
<div class="header">
<p>
Next: [[cvs: Reverting to the latest vendor release#Reverting to the latest vendor release|Reverting local changes]], Previous: [[cvs: Importing for the first time#Importing for the first time|First import]], Up: [[cvs: Tracking third-party sources#Tracking third-party sources|Tracking sources]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Updating-with-the-import-command"></div>
=== Updating with the import command ===

When a new release of the source arrives, you import it into the
repository with the same <code>import</code> command that you used to set up
the repository in the first place.  The only difference is that you
specify a different release tag this time:

<div class="example" style="margin-left: 3.2em">
 $ tar xfz wdiff-0.05.tar.gz
 $ cd wdiff-0.05
 $ cvs import -m &quot;Import of FSF v. 0.05&quot; fsf/wdiff FSF_DIST WDIFF_0_05
</div>

For files that have not been modified locally, the newly created
revision becomes the head revision.  If you have made local
changes, <code>import</code> will warn you that you must merge the changes
into the main trunk, and tell you to use &lsquo;<code>checkout -j</code>&rsquo; to do so:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff
</div>

The above command will check out the latest revision of
&lsquo;<code>wdiff</code>&rsquo;, merging the changes made on the vendor branch &lsquo;<code>FSF_DIST</code>&rsquo;
since yesterday into the working copy.  If any conflicts arise during
the merge they should be resolved in the normal way (see [[cvs: Conflicts example#Conflicts example|Conflicts example]]).  Then, the modified files may be committed.

However, it is much better to use the two release tags rather than using
a date on the branch as suggested above:

<div class="example" style="margin-left: 3.2em">
 $ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff
</div>

The reason this is better is that
using a date, as suggested above, assumes that you do
not import more than one release of a product per day.
More importantly, using the release tags allows <small>CVS</small> to detect files
that were removed between the two vendor releases and mark them for
removal.  Since <code>import</code> has no way to detect removed files, you
should do a merge like this even if <code>import</code> doesn&rsquo;t tell you to.


----

<div class="header">
<p>
Next: [[cvs: Reverting to the latest vendor release#Reverting to the latest vendor release|Reverting local changes]], Previous: [[cvs: Importing for the first time#Importing for the first time|First import]], Up: [[cvs: Tracking third-party sources#Tracking third-party sources|Tracking sources]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
